package me.leiusual.sharing.repository.datasource

import androidx.paging.DataSource
import me.leiusual.sharing.api.ApiSharing
import me.leiusual.sharing.api.model.storeproductquery.Product

/**
 * author: leiusual
 * create on: 2019-07-30
 * description:
 */
class ProductSearchDataSourceFactory(
    private val apiSharing: ApiSharing,
    private val keyword: String,
    private val storeId: Long
) : DataSource.Factory<Int, Product>() {

  override fun create(): DataSource<Int, Product> {
    return ProductSearchDataSource(apiSharing, keyword, storeId)
  }
}